"""
    raise 的使用，抛出异常
"""

def add(x,y):
    if isinstance(x,int) and isinstance(y,int):
        return x + y
    else:
        raise TypeError("参数类型错误")

try:
    # print(add(10,2))
    print(add(10,11.11))
except TypeError as e:
    print(f"程序异常...{e}")

print("end")